package com.qriver.modules.admin;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.client.discovery.DiscoveryClient;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class DemoProvider {
	
	@Autowired
	private DiscoveryClient discoveryClient;
	
	@GetMapping("/getService")
	//@ResponseBody
	public String getService() {
		String services = "Services: " + discoveryClient.getServices();
		//String services = "Services: " + discoveryClient.getApplications();
        System.out.println(services);
        return "demo.jsp";
	}

}
